<?php
/**
 * Project: AIGC
 * Author: moufer <moufer@163.com>
 * Date: 2024/7/20 15:13
 */

namespace module\chat\front\table;

use module\chat\model\Category;
use mof\utils\ElementData;

class VisroleTable extends AssistantTable
{

    protected function columnCategoryId(): array
    {
        return [
            "prop"    => 'category_id',
            "label"   => '分类',
            "search"  => true,
            "type"    => "select",
            "options" => ElementData::make(Category::getListByType('visrole'))
                ->toSelectOptions('name', 'id')
        ];
    }

    protected function columnName(): array
    {
        return [
            "prop"   => 'name',
            "label"  => '角色名称',
            "search" => true,
            "width"  => "*"
        ];
    }
}